package com.gzedu.module.dao.user.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.stereotype.Repository;

import com.gzedu.common.sys.dao.impl.BaseDao;
import com.gzedu.common.util.page.Page;
import com.gzedu.module.dao.user.IUserDao;
import com.gzedu.module.modle.user.User;

@Repository
public class UserDaoImpl extends BaseDao<User> implements IUserDao{
	@Resource
    private SqlSessionFactory sqlSessionFactory;  
  
	public SqlSessionFactory getSqlSessionFactory() {
		return sqlSessionFactory;
	}

	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		this.sqlSessionFactory = sqlSessionFactory;
	}

	

	public User selectByUserName(String userName) {
		// TODO Auto-generated method stub
		SqlSession session = this.getSqlSessionFactory().openSession();
		return session.selectOne(super.getStatement()+".selectByUserName", userName);
	}


}
